package com.tiancheng.trade.settlement.vo.settlement.merchantcontract;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;


@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class GetPageMerchantContractVO {

    @JsonProperty("contract_code")
    private String contractCode;           // 机构编码/机构ID

    @JsonProperty("organization_name")
    private String organizationName;           // 机构名称

    @JsonProperty("merchant_name")
    private String merchantName;               // 商户名称

    @JsonProperty("order_source")
    private String orderSource;               // 业务场景

    @JsonProperty("pay_channel")
    private String payChannel;               // 支付渠道

    @JsonProperty("invoice_type")
    private String invoiceType;               // 发票类型

    @JsonProperty("contract_sign_date")
    private String contractSignDate;               // 合同签定日期

    @JsonProperty("contract_start_date")
    private String contractStartDate;               // 合同开始时间

    @JsonProperty("contract_end_date")
    private String contractEndDate;               // 合同结束时间

    @JsonProperty("current_page")
    private Integer currentPage;

    @JsonProperty("page_size")
    private Integer pageSize;

    public Integer getCurrentPage() {
        if (null == currentPage || currentPage < 0) {
            currentPage = 1;
        }
        return currentPage;
    }

    public Integer getPageSize() {
        if (null == pageSize) {
            pageSize = 10;
        }
        return pageSize;
    }

    public String getContractCode() {
        if (StringUtils.isNotEmpty(contractCode)) {
            contractCode = contractCode.trim();
        }
        return contractCode;
    }

    public String getOrganizationName() {
        if (StringUtils.isNotEmpty(organizationName)) {
            organizationName = organizationName.trim();
        }
        return organizationName;
    }

    public String getMerchantName() {
        if (StringUtils.isNotEmpty(merchantName)) {
            merchantName = merchantName.trim();
        }
        return merchantName;
    }

}
